﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.SqlClient;

namespace QLThuVien
{
    public class KetNoi
    {
        public static string connectionstring = @"Data Source=KIRITO\SQLEXPRESS;Initial Catalog=QLThuVien;Integrated Security=True";
        public static SqlConnection scn;
        public static string chuoiketnoi()
        {
            return connectionstring;
        }

        public static void setconnect()
        {
            try
            {
                scn = new SqlConnection(connectionstring);
                scn.Open();
            }
            catch { }
        }

        public static void closeconnect()
        {
            scn.Close();
        }
    }
}
